#include "ClientApp.h"

#include "MsgMgr.h"
#include "Log.h"

#include "ClientMgr.h"

CClientApp::CClientApp():m_iSocket(-1)
{
}
        

CClientApp::~CClientApp()
{
}

bool CClientApp::Init()
{
	m_iSocket = CMsgMgr::Instance().AddConnect("127.0.0.1", 10812 );
	if (m_iSocket == -1)
	{
		LOG_ERR("Net Init Failed");
		return false;  
	}

	bool bFlag = CClientMgr::Instance().Init();
	if (bFlag == false)
	{
		LOG_ERR("CClientMgr Init Failed.");
		return false;
	}
	return true;
}
